package com.zjq.designpatterns.behaviors.intermediary.code;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * 聊天室适合中介者模式
 * @author jessie
 * @version 1.0
 * @date 2021/1/28
 */
public class Test {
    public static void main(String[] args) {
        User geely = new User("Geely");
        User tom = new User("Tom");
        geely.sendMessage(" Hey, Tom! Let's learn Design Pattern~");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        tom.sendMessage("OK!Geely");
    }
}
